package com.yishusmt.wechatapi.wechatdev.config;

import com.yishusmt.wechatapi.wechatdev.interceptors.RequestInterceptors;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author zhangyi
 * @date 2018/8/30 17:30
 */
@Configuration
public class ResourceConfig extends WebMvcConfigurerAdapter {
    /**
     * 拦截器
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new RequestInterceptors()).addPathPatterns("/**");
        super.addInterceptors(registry);
    }
}
